/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author gabrielbmoro
 */
public class Noticia extends DML{
    
    private String dadosDeNoticia;
    private byte[] imagem;
    
    public Noticia(String dadosDeNoticia, byte[] img)
    {
        this.dadosDeNoticia=dadosDeNoticia;
        this.imagem= img;
        super.table="noticia";
    }
    public boolean registrarDados(){
        String sql="INSERT INTO "+super.table+"(descricao,foto) VALUES(?,?);";
        super.conecta= ConectaBD.getInstance();
        try {
            super.preparedStatement= super.conecta.getConnection().prepareStatement(sql);
        } catch (SQLException ex) {
           ex.printStackTrace();
        }
        return false;
    }
    
}
